package cn.farm.farm.Mapper.CommonMapper;

import cn.farm.farm.Entity.Common.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ModifyUserMapper {
    @Update("update user set name = #{name},nickname = #{nickname},email = #{email},postcode = #{postcode},introduction = #{introduction}" +
            "where userID = #{userid}")
    void update(Integer userid, String name, String nickname, String email, String postcode, String introduction);

    @Select("select * from user where userID = #{userid}")
    User getUser(Integer userid);

    @Update("update user set password = #{password} where userID = #{userid}")
    Integer updateopassword(Integer userid, String password);

    @Update("update user set phone = #{phone} where userID = #{userid}")
    Integer modifyPhone(Integer userid, String phone);
}
